<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
	<title>触摸事件</title>
	<style type="text/css">
		body{
			margin: 0;
			padding: 0;
		}
		.box{
			width: 200px;
			height: 200px;
			background: pink;
			float: left;
		}
	</style>
</head>
<body>
<div class="box"></div>
<script type="text/javascript">
//window.onload 加载完之后执行
window.onload = function () {
	var box = document.querySelector('.box');
	box.addEventListener('touchstart',function (e) {
		console.log('touchstart');
		console.log(e.touches[0].clientX,e.touches[0].clientY);
		console.log(e.touches[0].pageX,e.touches[0].pageY);
		console.log(e.touches[0].screenX,e.touches[0].screenY);
	});
	box.addEventListener('touchmove',function (e) {
		console.log(e.touches[0].clientX,e.touches[0].clientY);
		console.log('touchmove');
		console.log(e);
	});
	box.addEventListener('touchend',function (e) {
		console.log(e.changedTouches [0].clientX,e.changedTouches [0].clientY);
		console.log('touchend');
		console.log(e);
	});
	box.addEventListener('click',function (e) {
		console.log('click');
		console.log(e);
	});
}

</script>
</body>
</html>